<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .big{
            width: 160px;
            height: 160px;
            border: none;
            background: #41a8c9;
        }
        .small{
            width: 80px;
            height: 80px;
            border: none;
            background: orange;
        }
    </style>
    <script type="text/javascript" src="vue/vue.min.js"></script>

</head>
<body>
<div id="app">
    <div class="big" @click="num+=1">
        <!--阻止事件冒泡，需在子级事件后加stop。阻止表单提交时prevent-->
        <div class="small" @click.stop.prevent="num+=1"
             :style="{'color':newColor, 'fontSize':newFontSize}">{{num
            }}</div>
    </div>
</div>

</body>
<script>
    var vm = new Vue({
        el:"#app",
        data:{
            num:0,
            newColor:"white",
            newFontSize:"20px"
        }
    })
</script>

</html>